package com.jshop.tree;

import java.util.ArrayList;
import java.util.List;

public class TreeNode {
	private String id; 
    private String text;
    private List<TreeNode> children; 
    public TreeNode() { 
        this(null,null);
    }
    public TreeNode(String id, String text) { 
    	 this.id = id; 
         this.text = text; 
         this.children = new ArrayList<TreeNode>(); 
    }
    public void addChild(TreeNode ctd) { 
        this.children.add(ctd); 
    } 
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	public List<TreeNode> getChildren() {
		return children;
	}
	public void setChildren(List<TreeNode> children) {
		this.children = children;
	}
    
}
